#pragma once
#include "GridworldState.h"
#include "Search.h"
#include "SearchDFID.h"
#include "SearchAStar.h"
#include "Mapping.h"

class PathingRequest
{
public:	
	int start;
	int goal;
};

/*
//typedef unsigned __int64 uint64;
typedef unsigned long uint64;
uint64 tickFrequency;	    // Ticks per second
uint64 tickCountBegin;	    // Initial tick position
uint64 tickCountEnd;	    // Final tick position
//*/

class Planning
{
public:
	Planning(void);
	~Planning(void);
	void		Test(Mapping* map);
	Solution*	getPath( Mapping* map, int target );

private:
	GridworldState gws;
	vector<string> tokenize(const string &str, const string &delim);
	bool loadPaths(string fileName, vector<PathingRequest> &pathData);
	void OutputInfo(ostream &osw, int n, int pathid, bool solved, 
	long nodesExpanded, Solution sol, double tim, GridworldState* gws);
	void Solve(ostream &osw, bool showBoard, string header, Search &search, vector<string> maps, vector<string> paths);
	void Solve(ostream &osw, bool showBoard, string header, Search &search);
	int LocationToLinarPos( Location inn );
	Solution sol;
	ofstream file;
};
